//三方工具-列表
<template>
    <div class="box">
            <div v-for="(item,index) in list" :key="index">
                <div class="title">
                    <img class="imgp" :src="item.iconurl ? item.iconurl : ''" alt="">
                    {{item.name}}
                </div>

                <div class="box-items">
                    <div class="item" v-for="item2 in item.navis" :key="item2.guid">
                        <el-link :underline="false" @click="detail(item2)">
                            <div class="item-box">
                                <div class="imgp-box">
                                    <img class="imgp" :src="item2.iconurl ? item2.iconurl : ''" alt="">
                                </div>
                                {{item2.name}}
                            </div>
                        </el-link>
                    </div>
                </div>
            </div>
    </div>
</template>

<script>
export default {
    head: {},
    props: {
        list: {
            type: Array,
            default: () => [],
        },
    },
    components: {},
    data: () => ({}),
    computed: {},
    watch: {},
    methods: {
        detail(item) {
            this.point(item);
            // 跳转
            window.open(item.url);
        },
        /**
         * 埋点
         */
        point(item) {
            this.$ajax({
                type: 'post',
                url: `${this.$store.state.api.tbUrl}/home/navigateclick.json`,
                data: {
                    type: item.type,
                    id: item.guid,
                    name: item.name,
                },
                callback: function (data, res) {},
                error: function () {},
            });
        },
    },
    mounted() {},
    beforeDestroy() {},
};
</script>

<style lang="scss" scoped>
@import '@css/var.scss';
.box {
    .title {
        color: #3b68ff;
        margin: 5px 0 0;
        .imgp {
            height: 20px;
            min-width: 20px;
            max-width: 50px;
            margin-bottom: -4px;
        }
    }

    .box-items {
        display: flex;
        flex-wrap: wrap;
        .item {
            width: 225px;
            margin: 5px 10px 5px 0;
            .item-box {
                display: flex;
                justify-content: flex-start;
                align-items: center;
            }
            .imgp-box {
                display: inline-block;
                height: 20px;
                width: 50px;
                margin-right: 2px;
                text-align: center;
                .imgp {
                    height: 20px;
                    min-width: 20px;
                    max-width: 50px;
                }
            }
        }
        .item:nth-child(4n + 4) {
            margin-right: 0px;
        }
        // justify-content:space-between;

        .shortItem{
            width: 84px;


        }


    }


}
</style>
 